<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 
<head> 
<title>Scuola Media E. d'Arborea - Lamarmora </title> 
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
<meta name="description" content="Il sito della scuola secondaria superiore di Iglesias, in Sardegna" /> 
<meta name="keywords" content="scuola, iglesias, didattica, insegnamento, docenti" /> 
<link rel="stylesheet" href="andreas08.css" type="text/css" media="screen,projection" /> 
<?php include $_ENV["DOCUMENT_ROOT"]."/js/prototype.php" ?>
<script type="text/javascript" src="/js/page.js"></script>
<script type="text/javascript">
var do_submit = function(){
	att = new Array();
	iframe = $('aframe').contentDocument;
	for(var i = 0; i < iframe.forms[0].elements.length; i++){
		//alert(a.name+"==>"+a.value);
		if(iframe.forms[0].elements[i].checked){
			//alert(iframe.forms[0].elements[i].name+="==>"+iframe.forms[0].elements[i].value);
			att.push(iframe.forms[0].elements[i].value);
		}
	}
	document.forms[0].insert.value = att.join(",");
	//alert(document.forms[0].insert.value);
	document.forms[0].submit();
}
</script>
<style>
td { height: 20px }
input, select, textarea {border: 1px solid #646060; color: #303030  }
</style>
</head> 
 
<body <?php if($sent){ print ("onload='alert(\"Mail inviata\")'"); } ?>> 
<div id="container" > 
 
<div id="header"> 
<h1>Scuola Media E. d'Arborea - Lamarmora</h1> 
<h2>area riservata ai docenti</h2> 
</div> 
<?php include "navigation.php" ?>
<div id="content"> 
<h2 style="text-align: center">Invio email</h2>
<form style="padding: 20px; border: 1px solid #eaeaea; width: 90%" method="post" action="send_mail.php?action=send">
<table style="width: 95%; margin: auto">
<tr>
	<td style="font-weight: bold; width: 10%">From</td>
	<td style="width: 90%"><input type="text" style="width: 95%" id="from" name="from" /></td>
</tr>
<tr>
	<td style="font-weight: bold; width: 10%"><a href="#">To</a></td>
	<td style="width: 90%"><input type="text" style="width: 95%" id="to" name="to" /></td>
</tr>
<tr>
	<td style="font-weight: bold; width: 10%">Oggetto</td>
	<td style="width: 90%"><input type="text" style="width: 95%" id="subject" name="subject" /></td>
</tr>
<tr>
	<td style="font-weight: bold; width: 10%"></td>
	<td style="font-weight: bold;"><div style="width: 100%; margin: 0px"><iframe src="/shared/attach_iframe.php" style="border: none; width: 100%; height: 30px; margin: 0px" frameborder="0" id="aframe"></iframe></div></td>
</tr>
<tr>
	<td style="font-weight: bold;" colspan="2"><textarea style="width: 96%; height: 150px" name="txt" id="txt"></textarea></td>
</tr>
<tr>
	<td style="font-weight: bold; text-align: right" colspan="2">
		<input type="button" onclick="do_submit()" value="Invia" style="font-size: 11px; border: 1px solid #646060; padding-left: 7px; padding-right: 7px; padding-top: 5px; padding-bottom: 5px; margin-right: 23px" />
		<input type="hidden" name="insert" id="insert" />	
	</td>
</tr>
</table>
</form>

<div class="splitcontentleft"> 
<p></p>
</div>  
</div>  
<div id="subcontent"> 
<?php include 'smallbox.php'; ?> 
<?php include "class_working.php" ?>
</div>
<?php include "footer.php" ?>
</div> 
</body> 
</html>